﻿Imports Microsoft.VisualBasic
Imports ADOEntity

Namespace Dataobject
    Public Class sPosition
        Dim position As New userEntities
        Dim intEmployeeCount As Integer

        'Public Function BindEmployees(ByVal startRowIndex As Integer, ByVal maximumRows As Integer, _
        '                              ByVal strPositionCode As String, ByVal strPositionName As String) As IQueryable
        '    'Dim qryPosition = From pos In position.SPOSITION Join dep In position.SDEPARTMENT On pos.DEPTCODE Equals dep.DEPTCODE _
        '    '              Select pos.POSCODE, pos.POSNAME, dep.DEPTNAME, pos.ISINACTIVE
        '    'If (strPositionCode = "") Then
        '    '    qryPosition = qryPosition.Where(Function(pos) pos.POSCODE.Contains(strPositionCode))
        '    'End If
        '    'If (strPositionName = "") Then
        '    '    qryPosition = qryPosition.Where(Function(pos) pos.POSNAME.Contains(strPositionName))
        '    'End If

        '    'GetEmployeeCount = qryPosition.Count
        '    'Return qryPosition.Skip(startRowIndex).Take(maximumRows)
        'End Function

        Public Property GetEmployeeCount() As Integer
            Get
                Return intEmployeeCount
            End Get
            Set(ByVal value As Integer)
                intEmployeeCount = value
            End Set



        End Property

        Public Function countEmployees() As Integer
            Return intEmployeeCount
        End Function








        'Public Function GetEmployeeCount() As Integer

        'End Function



        '    EmployeeInfoDataContext dbEmp = new EmployeeInfoDataContext();

        '    return (from emp in dbEmp.Employees

        '     select emp).Count();     



        '}


    End Class
End Namespace
